
%% Table D4
clear tab
tab=csvread('../temp/level_param.csv');
tab=[nan(1,2); tab(1:2,:); nan(1,2); tab(3:5,:)];

colNames={'NonCollege','College'};
rowNames={};
rowNames{end+1,1}='A. Single Mothers';
rowNames{end+1,1}='alpha';
rowNames{end+1,1}='psi_m';
rowNames{end+1,1}='B. Two-Parent Households';
rowNames{end+1,1}='alpha';
rowNames{end+1,1}='psi_m';
rowNames{end+1,1}='psi_f';

tab=array2table(tab,'VariableNames',colNames);
NewColumn = table(rowNames);
tab=[NewColumn, tab];
writetable(tab, '../../../../output/tables/TableD4.csv');

%% Table D5
clear tab0 tab
tab0=csvread('../temp/doutcome_baseline.csv');
tab=tab0(:,2);
tab0=csvread('../temp/doutcome_equal_wage.csv');
tab=[tab tab0(:,2)];
tab0=csvread('../temp/doutcome_equal_wage_price.csv');
tab=[tab tab0(:,2)];
tab0=csvread('../temp/doutcome_equal_tech.csv');
tab=[tab tab0(:,2)];
tab0=csvread('../temp/doutcome_equal_pref.csv');
tab=[tab tab0(:,2)];
tab=[nan(2,5); tab(1:4,:); nan(2,5); tab(8:11,:)];

colNames={'Baseline','Wages','AllPrices','Technology','Preferences'};
rowNames={};
rowNames{end+1,1}='A. Single Mothers';
rowNames{end+1,1}='Total Investment';
rowNames{end+1,1}=' Expenditure';
rowNames{end+1,1}=' Price';
rowNames{end+1,1}=' Quantity';
rowNames{end+1,1}='Mother''s Time Investment';
rowNames{end+1,1}='B. Two-Parent Households';
rowNames{end+1,1}='Total Investment';
rowNames{end+1,1}=' Expenditure';
rowNames{end+1,1}=' Price';
rowNames{end+1,1}=' Quantity';
rowNames{end+1,1}='Mother''s Time Investment';

tab=array2table(tab,'VariableNames',colNames);
NewColumn = table(rowNames);
tab=[NewColumn, tab];
writetable(tab, '../../../../output/tables/TableD5.csv');

%% Table D6

clear tab0 tab
tab0=csvread('../temp/change_W_30.csv');
tab=[tab0(:,1); tab0(:,2)];
tab0=csvread('../temp/change_W_temporary_30.csv');
tab=[tab [tab0(:,1); tab0(:,2)]];
tab0=csvread('../temp/change_W_constant_full_income_30.csv');
tab=[tab [tab0(:,1); tab0(:,2)]];
tab0=csvread('../temp/change_p_30.csv');
tab=[tab [tab0(:,1); tab0(:,2)]];
tab0=csvread('../temp/change_P_c_30.csv');
tab=[tab [tab0(:,1); tab0(:,2)]];

tab0=csvread('../temp/change_W_30_Cobb_Douglas.csv');
tab=[tab [tab0(:,1); tab0(:,2)]];
tab0=csvread('../temp/change_W_temporary_30_Cobb_Douglas.csv');
tab=[tab [tab0(:,1); tab0(:,2)]];
tab0=csvread('../temp/change_W_constant_full_income_30_Cobb_Douglas.csv');
tab=[tab [tab0(:,1); tab0(:,2)]];
tab0=csvread('../temp/change_p_30_Cobb_Douglas.csv');
tab=[tab [tab0(:,1); tab0(:,2)]];
tab0=csvread('../temp/change_P_c_30_Cobb_Douglas.csv');
tab=[tab [tab0(:,1); tab0(:,2)]];

tab=[nan(2,10); tab([1 3 5:7],:); nan(1,10); tab([10:11],:); nan(2,10); tab([12 14:18],:); nan(1,10); tab([21:22],:)];

colNames={'Wages','Wages_Temporary','Wages_ConstantIncome','Goods','ChildCare','Wages_CD','Wages_Temporary_CD','Wages_ConstantIncome_CD','Goods_CD','ChildCare_CD'};
rowNames={};
rowNames{end+1,1}='A. Single Mothers';
rowNames{end+1,1}='Change in Investment at Age 5';
rowNames{end+1,1}=' Total Expenditure';
rowNames{end+1,1}=' Mother''s Time';
rowNames{end+1,1}=' Goods';
rowNames{end+1,1}=' Child Care';
rowNames{end+1,1}=' Total';
rowNames{end+1,1}='Effects on Age 13 Achievement';
rowNames{end+1,1}=' 100*Log Achievement';
rowNames{end+1,1}=' Value';
rowNames{end+1,1}='B. Two-Parent Households';
rowNames{end+1,1}='Change in Investment at Age 5';
rowNames{end+1,1}=' Total Expenditure';
rowNames{end+1,1}=' Mother''s Time';
rowNames{end+1,1}=' Father''s Time';
rowNames{end+1,1}=' Goods';
rowNames{end+1,1}=' Child Care';
rowNames{end+1,1}=' Total';
rowNames{end+1,1}='Effects on Age 13 Achievement';
rowNames{end+1,1}=' 100*Log Achievement';
rowNames{end+1,1}=' Value';

tab=array2table(tab,'VariableNames',colNames);
NewColumn = table(rowNames);
tab=[NewColumn, tab];
writetable(tab, '../../../../output/tables/TableD6.csv');

